<!DOCTYPE html>
<html lang="en">

<head>
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
	<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
	<link rel="stylesheet" href="js/bootstrap/css/bootstrap.min.css" crossorigin="anonymous">
	<script src="js/jquery-2.1.4.min.js" crossorigin="anonymous"></script>
	<script src="js/jquery.cookie.min.js" crossorigin="anonymous"></script>
	<link rel="stylesheet" href="css/style.css" crossorigin="anonymous">
	<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
	<script src="js/bootstrap/js/bootstrap.min.js" crossorigin="anonymous"></script>
	<script src="js/vue.js"></script>
	<script src="js/app.js"></script>
	<title></title>
	<meta name="description" />
</head>

<body class="no-skin">
	<div class="container" id="appContainer">

		<nav class="navbar navbar-default">
			<div class="container-fluid">
				<!-- Brand and toggle get grouped for better mobile display -->
				<div class="navbar-header">
					<a  target="_blank">
						<div src="images/obloq_logo.png" class="navbar-brand"
							style="background-color: rgb(0, 0, 0);padding: 16px 20px;color: #fff;">SIoT</div>
					</a>
	
				</div>
	
				<!-- Collect the nav links, forms, and other content for toggling -->
				<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
					<ul class="nav navbar-nav">
						<li><a href="index.html"> 项目列表</a></li>
						<li><a href="devices.html">设备列表</a></li>
						<li><a href="sendMsg.html">发送消息</a></li>
						<li class="active"><a href="sfarm.html">智慧小屋（LED插件）</a></li>


					</ul>
					<ul class="nav navbar-nav navbar-right">
	
						<li><a href="#this" onclick="app.logout()"><span id="loginUserName"></span> 退出登陆</a></li>
					</ul>
				</div><!-- /.navbar-collapse -->
			</div>
		</nav>
<h5>{{webtitle}}</h5>

<section>
			<table class="table table-striped">
				<thead>
					<tr>
						<th>项目ID</th>

											<th>蓝状态</th>
						
						<th>绿灯状态</th>
						<th>红灯状态</th>
	
						<th>绿灯状态</th>
						<th>项目说明</th>
					</tr>
				</thead>
				<tbody>
				
	
					<tr v-for="(project,k) in projectsList">
						<th scope="row">{{project.ID}}</th>
						<td :class="project.ID+'_Blue'">{{getlastMsg(project.ID,"Blue")}}</td>
						<td :class="project.ID+'_Red'">{{getlastMsg(project.ID,"Red")}}</td>
						<td :class="project.ID+'_Green'">{{getlastMsg(project.ID,"Green")}}</td>
						<td> 
							<button type="button" class="btn btn-default" @click="openurl(project.ID)">详情</button>
							
							
							
	 <button type="button" class="btn btn-default" @click="sendMsg_af(project.ID + '/Blue','ledBlueOn')">开蓝灯</button>
	<button type="button" class="btn btn-default" @click="sendMsg_af(project.ID + '/Blue','ledBlueOff')">关蓝灯</button>
	<button type="button" class="btn btn-default" @click="sendMsg_af(project.ID + '/Red','ledRedOn')">开红灯</button>
	<button type="button" class="btn btn-default" @click="sendMsg_af(project.ID + '/Red','ledRedOff')">关红灯</button>
	<button type="button" class="btn btn-default" @click="sendMsg_af(project.ID + '/Green','ledGreenOn')">开绿灯</button>
	<button type="button" class="btn btn-default" @click="sendMsg_af(project.ID + '/Green','ledGreenOff')">关绿灯</button> 
					
						</td>
						
						
						
						
						
						
						<td>{{project.Description}}</td>
					</tr>

				</tbody>
			</table>
		</section>
	<div class="line"></div>
	
	</div>
</body>
<script src="modules/sfarm.js?v=1"></script>

</html>

